/**
    Copyright (c) 2010 yakiimo02
    Distributed under the New BSD License.
    See included license.txt or http://www.yakiimo3d.com/NewBSDLicense.txt
**/

#pragma once

class SceneBase;

/**
    @brief    Store fragments into a StructuredBuffer linked list.
    @author yakiimo02
    @date   2010/7/4
**/
class StoreFragments
{
public:
    StoreFragments();
    ~StoreFragments();

    HRESULT OnCreateDevice( ID3D11Device* pDevice );
    void    OnDestroyDevice();
    void    OnRender( ID3D11DeviceContext* pD3DContext, ID3D11Device* pDevice, const DXGI_SURFACE_DESC* pBackBufferDesc, SceneBase* pScene, D3DXMATRIXA16* pmViewProj,
                      const D3DXVECTOR3* pvCamEyePos, ID3D11RenderTargetView* pRTV, ID3D11DepthStencilView* pDSV, ID3D11UnorderedAccessView* pFragmentLinkUAV, 
                      ID3D11UnorderedAccessView* pStartOffsetUAV, ID3D11DepthStencilState* pDepthStencilState, ID3D11Buffer* pFragmentLink, ID3D11Buffer* pStartOffset );

protected:
    ID3D11PixelShader*            m_pPS;    
};

